package STUDENT.TRINHQUANGXUANDUC.OPPS.INHERISTANCE.BAI3;

import java.util.Scanner;

public class Views {
	public static void main(String[] args) {
		String ten;
		int Somat, Sochan, Sotayduoi, loaidoituong;
		Controllers controllers = new Controllers();
		Scanner sc = new Scanner(System.in);
		System.out.println("Nhap ten doi tuong:");
		ten = sc.nextLine();
		System.out.println("Nhap so chan:");
		sc = new Scanner(System.in);
		Sochan = sc.nextInt();
		System.out.println("Nhap so mat:");
		sc = new Scanner(System.in);
		Somat = sc.nextInt();
		System.out.println("Nhap so tay hoac so duoi:");
		sc = new Scanner(System.in);
		Sotayduoi = sc.nextInt();
		System.out.println("Chon loai doi tuong 1.Concho/2.Conguoi:");
		sc = new Scanner(System.in);
		loaidoituong = sc.nextInt();
		if (loaidoituong == 1) {
			Concho cho = new Concho();
			cho.setSoMat(Somat);
			cho.setSoduoi(Sotayduoi);
			cho.setSoChan(Sochan);
			cho.setTenDoituong(ten);
			controllers.InfoConCho(cho);
		}
		if (loaidoituong == 2) {
			Connguoi nguoi = new Connguoi();
			nguoi.setSoMat(Somat);
			nguoi.setSoTay(Sotayduoi);
			nguoi.setSoChan(Sochan);
			nguoi.setTenDoituong(ten);
			controllers.InfoConNguoi(nguoi);
		}
	}
}
